import Vue from 'vue'
import App from './App.vue'
import {initRouter} from './router'
import './theme/index.less'
import Antd from 'ant-design-vue'
import Viser from 'viser-vue'
import '@/mock'
import store from './store'
import 'animate.css/source/animate.css'
import Plugins from '@/plugins'
import {initI18n} from '@/utils/i18n'
import bootstrap from '@/bootstrap'

import imCloud from "@/assets/js/imCloud.js";


const router = initRouter(store.state.setting.asyncRoutes)
const i18n = initI18n('CN', 'US')
const SockPlugin = (_, options) => {
  Vue.prototype.$cloud = imCloud(options)
}
Vue.use(Antd)
Vue.config.productionTip = false
Vue.use(Viser)
Vue.use(Plugins)
Vue.use(SockPlugin, {
  heartbeatEnable: true,
  url: "ws://www.janjanle.com:9010"
  // url: "ws://192.168.1.65:9010"
  // url: "ws://127.0.0.1:9010"
  // url: 'ws://4wqn1t4v.duankouyingshe.net:15252'
})

bootstrap({router, store, i18n, message: Vue.prototype.$message})

new Vue({
  router,
  store,
  i18n,
  render: h => h(App),
}).$mount('#app')
